<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>module Gem::Resolver::Molinillo::Delegates::SpecificationProvider - rubygems: Ruby Standard Library Documentation</title>


<script src="../../../../js/navigation.js" defer></script>
<script src="../../../../js/search.js" defer></script>
<script src="../../../../js/search_index.js" defer></script>
<script src="../../../../js/searcher.js" defer></script>
<script src="../../../../js/darkfish.js" defer></script>

<script src="../../../../js/jquery-3.2.0.min.js"></script>

<script src="../../../../js/vue.min.js"></script>
<script src="../../../../js/js.cookie.min.js"></script>

<link href="../../../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../../../css/rdoc.css" rel="stylesheet">
<link href="../../../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../../../";
  var index_rel_prefix = "../../../../";
  var darkModeCsseHref = "../../../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="module">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../../../table_of_contents.html#pages">Pages</a>
    <a href="../../../../table_of_contents.html#classes">Classes</a>
    <a href="../../../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-i-allow_missing-3F">#allow_missing?</a>
    <li ><a href="#method-i-dependencies_equal-3F">#dependencies_equal?</a>
    <li ><a href="#method-i-dependencies_for">#dependencies_for</a>
    <li ><a href="#method-i-name_for">#name_for</a>
    <li ><a href="#method-i-name_for_explicit_dependency_source">#name_for_explicit_dependency_source</a>
    <li ><a href="#method-i-name_for_locking_dependency_source">#name_for_locking_dependency_source</a>
    <li ><a href="#method-i-requirement_satisfied_by-3F">#requirement_satisfied_by?</a>
    <li ><a href="#method-i-search_for">#search_for</a>
    <li ><a href="#method-i-sort_dependencies">#sort_dependencies</a>
    <li ><a href="#method-i-with_no_such_dependency_error_handling">#with_no_such_dependency_error_handling</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="module-Gem::Resolver::Molinillo::Delegates::SpecificationProvider">
    <h1 id="module-Gem::Resolver::Molinillo::Delegates::SpecificationProvider" class="module">
      module Gem::Resolver::Molinillo::Delegates::SpecificationProvider
    </h1>

    <section class="description">
    
<p><a href="../Delegates.html"><code>Delegates</code></a> all {Gem::Resolver::Molinillo::SpecificationProvider} methods to a ‘#specification_provider` property.</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-allow_missing-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">allow_missing?</span><span
                                class="method-args">(dependency)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-allow_missing-3F"><code>Gem::Resolver::Molinillo::SpecificationProvider#allow_missing?</code></a>)</p>

                              <div class="method-source-code" id="allow_missing-3F-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">allow_missing?</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">allow_missing?</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-dependencies_equal-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">dependencies_equal?</span><span
                                class="method-args">(dependencies, other_dependencies)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-dependencies_equal-3F"><code>Gem::Resolver::Molinillo::SpecificationProvider#dependencies_equal?</code></a>)</p>

                              <div class="method-source-code" id="dependencies_equal-3F-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 30</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">dependencies_equal?</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-identifier">other_dependencies</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">dependencies_equal?</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-identifier">other_dependencies</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-dependencies_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">dependencies_for</span><span
                                class="method-args">(specification)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-dependencies_for"><code>Gem::Resolver::Molinillo::SpecificationProvider#dependencies_for</code></a>)</p>

                              <div class="method-source-code" id="dependencies_for-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 16</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">dependencies_for</span>(<span class="ruby-identifier">specification</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">dependencies_for</span>(<span class="ruby-identifier">specification</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">name_for</span><span
                                class="method-args">(dependency)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-name_for"><code>Gem::Resolver::Molinillo::SpecificationProvider#name_for</code></a>)</p>

                              <div class="method-source-code" id="name_for-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">name_for</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">name_for</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name_for_explicit_dependency_source" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">name_for_explicit_dependency_source</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-name_for_explicit_dependency_source"><code>Gem::Resolver::Molinillo::SpecificationProvider#name_for_explicit_dependency_source</code></a>)</p>

                              <div class="method-source-code" id="name_for_explicit_dependency_source-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">name_for_explicit_dependency_source</span>
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">name_for_explicit_dependency_source</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name_for_locking_dependency_source" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">name_for_locking_dependency_source</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-name_for_locking_dependency_source"><code>Gem::Resolver::Molinillo::SpecificationProvider#name_for_locking_dependency_source</code></a>)</p>

                              <div class="method-source-code" id="name_for_locking_dependency_source-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 51</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">name_for_locking_dependency_source</span>
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">name_for_locking_dependency_source</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-requirement_satisfied_by-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">requirement_satisfied_by?</span><span
                                class="method-args">(requirement, activated, spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-requirement_satisfied_by-3F"><code>Gem::Resolver::Molinillo::SpecificationProvider#requirement_satisfied_by?</code></a>)</p>

                              <div class="method-source-code" id="requirement_satisfied_by-3F-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 23</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">requirement_satisfied_by?</span>(<span class="ruby-identifier">requirement</span>, <span class="ruby-identifier">activated</span>, <span class="ruby-identifier">spec</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">requirement_satisfied_by?</span>(<span class="ruby-identifier">requirement</span>, <span class="ruby-identifier">activated</span>, <span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-search_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">search_for</span><span
                                class="method-args">(dependency)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-search_for"><code>Gem::Resolver::Molinillo::SpecificationProvider#search_for</code></a>)</p>

                              <div class="method-source-code" id="search_for-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 9</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">search_for</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">search_for</span>(<span class="ruby-identifier">dependency</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-sort_dependencies" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">sort_dependencies</span><span
                                class="method-args">(dependencies, activated, conflicts)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>(see <a href="../SpecificationProvider.html#method-i-sort_dependencies"><code>Gem::Resolver::Molinillo::SpecificationProvider#sort_dependencies</code></a>)</p>

                              <div class="method-source-code" id="sort_dependencies-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 58</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sort_dependencies</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-identifier">activated</span>, <span class="ruby-identifier">conflicts</span>)
  <span class="ruby-identifier">with_no_such_dependency_error_handling</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">specification_provider</span>.<span class="ruby-identifier">sort_dependencies</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-identifier">activated</span>, <span class="ruby-identifier">conflicts</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-with_no_such_dependency_error_handling" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">with_no_such_dependency_error_handling</span><span
                                class="method-args">() { || ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Ensures any raised {NoSuchDependencyError} has its {NoSuchDependencyError#required_by} set. @yield</p>

                              <div class="method-source-code" id="with_no_such_dependency_error_handling-source">
            <pre><span class="ruby-comment"># File rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb, line 76</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">with_no_such_dependency_error_handling</span>
  <span class="ruby-keyword">yield</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">NoSuchDependencyError</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">error</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">state</span>
    <span class="ruby-identifier">vertex</span> = <span class="ruby-identifier">activated</span>.<span class="ruby-identifier">vertex_named</span>(<span class="ruby-identifier">name_for</span>(<span class="ruby-identifier">error</span>.<span class="ruby-identifier">dependency</span>))
    <span class="ruby-identifier">error</span>.<span class="ruby-identifier">required_by</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">vertex</span>.<span class="ruby-identifier">incoming_edges</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">origin</span>.<span class="ruby-identifier">name</span> }
    <span class="ruby-identifier">error</span>.<span class="ruby-identifier">required_by</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">name_for_explicit_dependency_source</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">vertex</span>.<span class="ruby-identifier">explicit_requirements</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">raise</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

